package com.ocl.www.mapper;

import java.sql.SQLException;
import java.util.List;

import com.ocl.www.domain.UserFans;
import org.apache.ibatis.annotations.Mapper;

import com.ocl.www.domain.User;

@Mapper
public interface UserMapper {
	
	/**
	 * 
	 * @describe 根据用户信息查询用户记录
	 * @param user
	 * @return 用户记录
	 * @throws SQLException
	 */
	User selectUserInfo (User user) throws SQLException;
	

	/**
	 * 
	 * @param userName
	 * @return
	 * @throws SQLException
	 */
	Integer QueryUsernameIsUnique(String userName) throws SQLException;
	
	/**
	 * 
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	Integer insertUser(User user) throws SQLException;

	/**
	 * 
	 * @param userName
	 * @param password
	 * @return
	 * @throws SQLException
	 */
	List<User> QueryUserlist(String userName,String password) throws SQLException;


	int updateUserInfo(User user) throws SQLException;


	int updateEmail(User user) throws SQLException;


	int updateUserheadImg(User user)  throws SQLException;


	int addUserInfo(User user)  throws SQLException;

    List<User> selectUsers() throws SQLException;

	List<User> selectFansForUser(User user) throws SQLException;


	List<User> getFollows(UserFans userFans) throws SQLException;

	List<User> getFans(UserFans userFans) throws SQLException;
}
